package com.fastloan.mgt.processcontrol.base.model;

/**
 * 主体对应方法
 *
 * @author yanwe
 * createTime 2017-11-2017/11/6 15:59
 */
public class CustomProcess {

    /**
     * 方法类路径 SimpleName
     */
    private String processClass;

    /**
     * 方法顺序
     */
    private Integer processOrder;

    public String getProcessClass() {
        return processClass;
    }

    public void setProcessClass(String processClass) {
        this.processClass = processClass;
    }

    public Integer getProcessOrder() {
        return processOrder;
    }

    public void setProcessOrder(Integer processOrder) {
        this.processOrder = processOrder;
    }


    public static final class CustomProcessBuilder {
        private String processClass;
        private Integer processOrder;

        private CustomProcessBuilder() {
        }

        public static CustomProcessBuilder aCustomProcess() {
            return new CustomProcessBuilder();
        }

        public CustomProcessBuilder withProcessClass(String processClass) {
            this.processClass = processClass;
            return this;
        }

        public CustomProcessBuilder withProcessOrder(Integer processOrder) {
            this.processOrder = processOrder;
            return this;
        }

        public CustomProcess build() {
            CustomProcess customProcess = new CustomProcess();
            customProcess.setProcessClass(processClass);
            customProcess.setProcessOrder(processOrder);
            return customProcess;
        }
    }
}
